Skip to content

Update GO SDK#2597

Merged
juan-malbeclabs merged 2 commits intomainfrom
jo/update_go_sdk
Jan 15, 2026
Merged

Update GO SDK#2597
juan-malbeclabs merged 2 commits intomainfrom
jo/update_go_sdk

Conversation

@juan-malbeclabs
Copy link
Contributor

This pull request introduces new health and desired status fields for both devices and links in the serviceability/state.go file, enhancing the ability to track and serialize their operational states. These changes add new enums, fields, and JSON serialization logic to support more granular state management.

Device state enhancements:

  • Added new enums: DeviceHealth and DeviceDesiredStatus, with corresponding string values and JSON serialization methods.
  • Updated the Device struct to include DeviceHealth and DeviceDesiredStatus fields.
  • Modified the Device JSON serialization to output the new health and desired status fields. [1] [2]
  • Added a new DeviceStatusDrained status to the existing DeviceStatus enum.

Link state enhancements:

  • Added new enums: LinkHealth and LinkDesiredStatus, with corresponding string values and JSON serialization methods.
  • Updated the Link struct to include LinkHealth and LinkDesiredStatus fields.
  • Modified the Link JSON serialization to output the new health and desired status fields. [1] [2]

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances state management for devices and links by introducing health and desired status tracking capabilities to the Go SDK.

Changes:

  • Added DeviceHealth and DeviceDesiredStatus enums with JSON serialization support
  • Added LinkHealth and LinkDesiredStatus enums with JSON serialization support
  • Extended Device and Link structs with new health and desired status fields

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fix String()

Refactor DeviceDesiredStatus String method for clarity and error handling

Fix LinkHealth String method to use underscores in status string

fix: update expected output to include link_desired_status in test cases
@juan-malbeclabs juan-malbeclabs merged commit 619361b into main Jan 15, 2026
21 checks passed
@juan-malbeclabs juan-malbeclabs deleted the jo/update_go_sdk branch January 15, 2026 15:38
ANISH-SR pushed a commit to ANISH-SR/doublezero that referenced this pull request Jan 20, 2026
This pull request introduces new health and desired status fields for
both devices and links in the `serviceability/state.go` file, enhancing
the ability to track and serialize their operational states. These
changes add new enums, fields, and JSON serialization logic to support
more granular state management.

**Device state enhancements:**
- Added new enums: `DeviceHealth` and `DeviceDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Device` struct to include `DeviceHealth` and
`DeviceDesiredStatus` fields.
- Modified the `Device` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R399-R400)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R420-R421)
- Added a new `DeviceStatusDrained` status to the existing
`DeviceStatus` enum.

**Link state enhancements:**
- Added new enums: `LinkHealth` and `LinkDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Link` struct to include `LinkHealth` and
`LinkDesiredStatus` fields.
- Modified the `Link` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R557-R558)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R569-R570)

---------

Co-authored-by: jolveira@gmail.com <jolveira@gmail.com>
ANISH-SR pushed a commit to ANISH-SR/doublezero that referenced this pull request Jan 26, 2026
This pull request introduces new health and desired status fields for
both devices and links in the `serviceability/state.go` file, enhancing
the ability to track and serialize their operational states. These
changes add new enums, fields, and JSON serialization logic to support
more granular state management.

**Device state enhancements:**
- Added new enums: `DeviceHealth` and `DeviceDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Device` struct to include `DeviceHealth` and
`DeviceDesiredStatus` fields.
- Modified the `Device` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R399-R400)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R420-R421)
- Added a new `DeviceStatusDrained` status to the existing
`DeviceStatus` enum.

**Link state enhancements:**
- Added new enums: `LinkHealth` and `LinkDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Link` struct to include `LinkHealth` and
`LinkDesiredStatus` fields.
- Modified the `Link` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R557-R558)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R569-R570)

---------

Co-authored-by: jolveira@gmail.com <jolveira@gmail.com>
thijsvanemmerik pushed a commit that referenced this pull request Feb 3, 2026
This pull request introduces new health and desired status fields for
both devices and links in the `serviceability/state.go` file, enhancing
the ability to track and serialize their operational states. These
changes add new enums, fields, and JSON serialization logic to support
more granular state management.

**Device state enhancements:**
- Added new enums: `DeviceHealth` and `DeviceDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Device` struct to include `DeviceHealth` and
`DeviceDesiredStatus` fields.
- Modified the `Device` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R399-R400)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R420-R421)
- Added a new `DeviceStatusDrained` status to the existing
`DeviceStatus` enum.

**Link state enhancements:**
- Added new enums: `LinkHealth` and `LinkDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Link` struct to include `LinkHealth` and
`LinkDesiredStatus` fields.
- Modified the `Link` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R557-R558)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R569-R570)

---------

Co-authored-by: jolveira@gmail.com <jolveira@gmail.com>
thijsvanemmerik pushed a commit that referenced this pull request Feb 3, 2026
This pull request introduces new health and desired status fields for
both devices and links in the `serviceability/state.go` file, enhancing
the ability to track and serialize their operational states. These
changes add new enums, fields, and JSON serialization logic to support
more granular state management.

**Device state enhancements:**
- Added new enums: `DeviceHealth` and `DeviceDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Device` struct to include `DeviceHealth` and
`DeviceDesiredStatus` fields.
- Modified the `Device` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R399-R400)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R420-R421)
- Added a new `DeviceStatusDrained` status to the existing
`DeviceStatus` enum.

**Link state enhancements:**
- Added new enums: `LinkHealth` and `LinkDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Link` struct to include `LinkHealth` and
`LinkDesiredStatus` fields.
- Modified the `Link` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R557-R558)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R569-R570)

---------

Co-authored-by: jolveira@gmail.com <jolveira@gmail.com>
thijsvanemmerik pushed a commit that referenced this pull request Feb 3, 2026
This pull request introduces new health and desired status fields for
both devices and links in the `serviceability/state.go` file, enhancing
the ability to track and serialize their operational states. These
changes add new enums, fields, and JSON serialization logic to support
more granular state management.

**Device state enhancements:**
- Added new enums: `DeviceHealth` and `DeviceDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Device` struct to include `DeviceHealth` and
`DeviceDesiredStatus` fields.
- Modified the `Device` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R399-R400)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R420-R421)
- Added a new `DeviceStatusDrained` status to the existing
`DeviceStatus` enum.

**Link state enhancements:**
- Added new enums: `LinkHealth` and `LinkDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Link` struct to include `LinkHealth` and
`LinkDesiredStatus` fields.
- Modified the `Link` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R557-R558)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R569-R570)

---------

Co-authored-by: jolveira@gmail.com <jolveira@gmail.com>
thijsvanemmerik pushed a commit that referenced this pull request Feb 3, 2026
This pull request introduces new health and desired status fields for
both devices and links in the `serviceability/state.go` file, enhancing
the ability to track and serialize their operational states. These
changes add new enums, fields, and JSON serialization logic to support
more granular state management.

**Device state enhancements:**
- Added new enums: `DeviceHealth` and `DeviceDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Device` struct to include `DeviceHealth` and
`DeviceDesiredStatus` fields.
- Modified the `Device` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R399-R400)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R420-R421)
- Added a new `DeviceStatusDrained` status to the existing
`DeviceStatus` enum.

**Link state enhancements:**
- Added new enums: `LinkHealth` and `LinkDesiredStatus`, with
corresponding string values and JSON serialization methods.
- Updated the `Link` struct to include `LinkHealth` and
`LinkDesiredStatus` fields.
- Modified the `Link` JSON serialization to output the new health and
desired status fields.
[[1]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R557-R558)
[[2]](diffhunk://#diff-057f627e5f2629b35f1976fba6eaa1b3c507c511b0f47d2f80a3a1d0c684c4a1R569-R570)

---------

Co-authored-by: jolveira@gmail.com <jolveira@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants